from DrissionPage import ChromiumPage, ChromiumOptions


def get_page(port, user_path, downpath):
    co = ChromiumOptions()
    co.set_paths(local_port=port, user_data_path=user_path)
    page = ChromiumPage(addr_or_opts=co)
    page.set.download_path(downpath)
    page.set.timeouts(10)
    page.set.when_download_file_exists('overwrite')
    return page
